package simulator;

public class Point {

	// state code
	public static final int AVAILABLE = 0;
	public static final int OCCUPIED = 1;
	public static final int BANNED = -1;

	private int state = BANNED;

	private int x = 0;
	private int y = 0;

	// private Card card = null;

	public Point(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	@Override
	public String toString() {
		return this.x + "." + this.y;
	}

	@Override
	public boolean equals(Object arg0) {
		if (this == arg0)
			return true;
		if (!(arg0 instanceof Point))
			return false;

		Point p = (Point) arg0;

		return this.x == p.x && this.y == p.y;
	}

	@Override
	public int hashCode() {
		int hc = 17;
		hc = 37 * hc + state;
		hc = 37 * hc + x;
		hc = 37 * hc + y;

		return hc;

	}
	// public Card getCard() {
	// return card;
	// }
	//
	// public void setCard(Card card) {
	// this.card = card;
	// }

}
